<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>条形码印刷&发放管理</title>
<link rel="stylesheet" href="<%=path%>/easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="<%=path%>/easyui/themes/icon.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="<%=path%>/css/main.css" type="text/css"
	media="screen" />
<link rel="stylesheet" type="text/css" href="<%=path%>/css/Tooltip.css" />
<script src="<%=path%>/easyui/jquery-1.4.4.min.js"></script>
<script src="<%=path%>/easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="<%=path%>/myjs/myTab.js"></script>
<!-- sys -->
<script src="<%=path%>/myjs/sys.js"></script>
<script src="<%=path%>/myjs/barCode.js"></script>
<script src="<%=path%>/easyui/easyMask.js"></script>
<script src="<%=path%>/easyui/easyUI.js"></script>
<script src="<%=path%>/easyui/easyLayer.js"></script>
<script src="<%=path%>/myjs/DatePicker/WdatePicker.js"></script>
<!-- validation -->
<!-- 
<script src="<%=path%>/validation/jquery.bgiframe.min.js"></script>
<script src="<%=path%>/validation/easy_validator.pack.js"></script>
 -->
<script>
	    var proPath = '<%=path%>';
		var greyLayer ;
		$(function(){
			grid = $('#tt').datagrid({
				url:'<%=path%>/barCode/getBarCodes',
			nowrap : false,
			striped : true, //隔行换色
			singleSelect : true,//是否单选
			fit : true,//表格自动填充
			pageNumber : 1, //当前页码
			pageSize:20,
			pagination : true,//是否显示分页项
			rownumbers : true, //显示行号
			loadMsg : '正在努力为您加载，请稍作等待…',//加载信息
			toolbar : [ {
				text : '新增',
				iconCls : 'icon-add',
				handler : 'newBarCode'
			}, '-', {
				text : '修改',
				iconCls : 'icon-edit',
				handler : function() {
					editCode();
				}

			}, '-', {
				text : '删除',
				iconCls : 'icon-cancel',
				handler : function() {
					delCode();
				}

			}, '-', {
				text : '更新到印刷中状态',
				iconCls : 'icon-undo',
				handler : 'chgYSStatus'
			}, '-', {
				text : '更新到印刷完成状态',
				iconCls : 'icon-undo',
				handler : 'chgWCStatus'
			}, '-', {
				text : '更新到已下发状态',
				iconCls : 'icon-undo',
				handler : 'chgXFStatus'
			} ]
		});
		
		$('#company_code').combobox({
			url:proPath+"/casePropertyStorage/getCompanyInfo",
			multiple:false,
			onChange:function(newValue,oldValue){  
				$('#company_code').val(newValue);
			}
		});	
		//初始化pagination工具开始
		var pagetool = $('#tt').datagrid('getPager');
		pagetool.pagination({
			beforePageText : '第',
			afterPageText : '页，共{pages}页',
			displayMsg : '显示从 {from} 到  {to} , 总记录 {total} '
		});
		//初始化pagination工具结束
		$('body').layout();
		$('#btn-save,#btn-cancel').linkbutton();
		win = $('#user-window').window({
			collapsible : false,
			minimizable : false,
			maximizable : true,
			closable : true,
			onClose : function() {
				greyLayer.close();
			},
			closed : true,
			cache : false
		});
		view_use = $('#view_use').window({
			collapsible : false,
			minimizable : false,
			maximizable : true,
			closable : true,
			onClose : function() {
				greyLayer.close();
			},
			closed : true,
			cache : false
		});
		form = win.find('form');
		greyLayer = new easyMask(null, '100%', '100%', 100, '#000', 8, true);
	});
</script>
</head>
<body>
	<div id="window-center" region="center" fit="true"
		style="padding: 5px;">
		<table id="tt">
			<thead>
				<tr>
					<th field="company_name" width="350%">          单位名称		</th>		
					<th field="c_name" width="100%">          节点状态		</th>		
					<th field="tcode_start" width="100%">        条形码起始号	</th>	
					<th field="tcode_end" width="100%">         条形码结束号	</th>
				</tr>
			</thead>
		</table>
	</div>
	<div id="user-window" title="条形码印刷&发放管理"
		style="width: 420px; height: 200px;">
		<div style="padding: 20px 20px 40px 40px;">

			<form method="post">
				<table>
					<tr>
						<td>所属单位：</td>
						<td id="dw"><input type='text' id="company_code" name='company_code' valueField="company_code" textField="company_name" panelWidth="240px"  required="true"/></input></td>
					</tr>
				
				
					<tr>
						<td>制作数量：</td>
						<td><input  id="tcode_end" name="tcode_end" style="width:250px;" 	class="easyui-numberbox" precision="0" required="true"	></input></td>
					</tr>
				</table>
			</form>

		</div>
		<div style="text-align: center; padding: 5px;">
			<a href="javascript:void(0)" onclick="save()" id="btn-save"
				icon="icon-save">确定</a> <a href="javascript:void(0)"
				onclick="closeWindow()" id="btn-cancel" icon="icon-cancel">取消</a>
		</div>
	</div>
	
</body>
</html>
